package com.dolphin.fly.service.system;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dolphin.fly.domain.entity.system.User;
import com.dolphin.fly.domain.repository.system.UserDao;

@Service
@Transactional
public class AccountService {

    private UserDao userDao;

    /**
     * 
     * <根据登录名获取用户信息><br />
     * <功能详细描述>
     *
     * @param loginName
     * @return
     * @see [类、类#方法、类#成员]
     */
    @Transactional(readOnly = true)
    public User findByUsername(String username) {
        return userDao.findByLoginName(username);
    }

    @Autowired
    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

}
